<form id="second-form" role="form" data-toggle="validator" method="POST" action="">
    <input name="row[class_subject_id]" type="hidden" value="{$class_subject_id}">
    <input name="row[class_id]" type="hidden" value="{$class_id}">

    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('元素事件')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="eventtpl" data-name="row[event]">
                <dd>
                    <ins>上课周：</ins>
                    <ins>上课时间：</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append hidden"><i class="fa fa-plus"></i>
                    {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[event]" class="form-control hidden" cols="30" rows="5">[{"w_id":"星期天","time_slot":""},{"w_id":"星期一","time_slot":""},{"w_id":"星期二","time_slot":""},{"w_id":"星期三","time_slot":""},{"w_id":"星期四","time_slot":""},{"w_id":"星期五","time_slot":""},{"w_id":"星期六","time_slot":""}]</textarea>
            </dl>
            <script id="eventtpl" type="text/html">
                <dd class="form-inline">
                    <ins style="width:110px"><input style="width:110px" type="text" name="<%=name%>[<%=index%>][w_id]"
                                                    class="form-control" value="<%=row.w_id%>" readonly/></ins>
                    <ins style="width:400px"><input style="width:400px" type="text"
                                                    name="<%=name%>[<%=index%>][time_slot]" data-multiple="true"
                                                    class="form-control selectpage"
                                                    data-source="school_schedule_time/index" data-field="start_date"
                                                    value="<%=row.time_slot%>" placeholder="上课时间" size="10"/></ins>
                    <!--下面的两个按钮务必保留-->
                </dd>
            </script>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
